import request from "@/libs/request";

const basePath = '/appcloud-log-es' ;

export const apiUrls = {
  deleteLog : basePath + '/appcloudes/deleteOprateLogInfo/',
	getLogByTemplateId : basePath + '/appcloudes/getLogByTemplateId/',
	getLogInfoById : basePath + '/appcloudes/getLogInfoById/',
	searchBussinessInfoPage : basePath + '/appcloudes/searchBussinessInfoPage/',
	searchLogByTemplateIdPage : basePath + '/appcloudes/searchLogByTemplateIdPage/',
	searchLogInfo : basePath + '/appcloudes/searchLogInfo/',
	searchLogInitId : basePath + '/appcloudes/searchLogInitId/',
  searchLogInitIdInfoPage : basePath + '/appcloudes/searchLogInitIdInfoPage/',
  searchLogByInstIdPage : basePath + '/appcloudes/searchLogByInstIdPage'
}
//删除操作日志
export async function deleteLog(id){
	return request( apiUrls.deleteLog + id, {
      method:'GET',
  })
}


//（原 未分页）构建日志查询
export async function getLogByTemplateId(id){
	return request( apiUrls.getLogByTemplateId + id, {
      method:'GET',
  })
}

//通过 构建实例 的ID 获取 日志信息
export async function getLogInfoById(id){
	return request( apiUrls.getLogInfoById + id, {
      method:'GET',
  })
}

// (分页)业务日志查询
export async function searchBussinessInfoPage(params){
	return request( apiUrls.searchBussinessInfoPage, {
      method:'POST',
      body:params
  })
}

//(分页)构建日志查询(通过事件ID 查询)
export async function searchLogByInstIdPage(params){
	return request( apiUrls.searchLogByInstIdPage, {
      method:'POST',
      body:params
  })
}

// (分页)构建日志查询
export async function searchLogByTemplateIdPage(params){
	return request( apiUrls.searchLogByTemplateIdPage, {
      method:'POST',
      body:params
  })
}

// (分页)操作日志查询
export async function searchLogInfo(params){
	return request( apiUrls.searchLogInfo, {
      method:'POST',
      body:params
  })
}


// （原 未分页）发布日志查询
export async function searchLogInitId(params){
	return request( apiUrls.searchLogInitId + params.id , {
      method:'GET',
  })
}

// (分页)发布日志查询
export async function searchLogInitIdInfoPage(params){
	return request( apiUrls.searchLogInitIdInfoPage, {
      method:'POST',
      body:params
  })
}

